import { lazy } from "react";
import { Navigate } from 'react-router-dom'
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons'
const Detail=lazy(()=>import('../promise/Detail'))
const Home=lazy(()=>import('../promise/Home'))
const MyLayout = lazy(() => import('../promise/MyLayout'))

export const tabbar=[
    {
        path: '/home',
        element: <Home />,
        title:'首页',
        icon:<FriendsO/>
    }
]
export const routes=[
    {
        path: '/',
        element: <MyLayout />,
        children: [
            ...tabbar,
            {
                path: '/',
                element:<Navigate to='/home'></Navigate>
            }
        ]
    },
    {
        path: '/detail',
        element: <Detail />,
       
    }
]